.class public Llt/noframe/gpsfarmguide/views/FragmentSettings;
.super Lcom/github/machinarius/preferencefragment/PreferenceFragment;
.source "FragmentSettings.java"

# interfaces
.implements Landroid/content/SharedPreferences$OnSharedPreferenceChangeListener;


# instance fields
.field createBackup:Landroid/preference/Preference;

.field f:Ljava/text/DecimalFormat;

.field private fireAnalytics:Llt/noframe/gpsfarmguide/analytics/FireAnalytics;

.field gps_external:Landroid/preference/Preference;

.field gps_location_in_tractor:Landroid/preference/Preference;

.field gps_refresh_rate_btn:Landroid/preference/Preference;

.field implement_location:Landroid/preference/Preference;

.field implement_width:Landroid/preference/Preference;

.field restoreBackup:Landroid/preference/Preference;


# direct methods
.method public constructor <init>()V
    .locals 0

    .line 48
    invoke-direct {p0}, Lcom/github/machinarius/preferencefragment/PreferenceFragment;-><init>()V

    return-void
.end method

.method static synthetic access$000(Llt/noframe/gpsfarmguide/views/FragmentSettings;)Llt/noframe/gpsfarmguide/analytics/FireAnalytics;
    .locals 0

    .line 48
    iget-object p0, p0, Llt/noframe/gpsfarmguide/views/FragmentSettings;->fireAnalytics:Llt/noframe/gpsfarmguide/analytics/FireAnalytics;

    return-object p0
.end method

.method private restartApp()V
    .locals 3

    .line 453
    new-instance v0, Landroid/app/AlertDialog$Builder;

    invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getActivity()Landroidx/fragment/app/FragmentActivity;

    move-result-object v1

    invoke-direct {v0, v1}, Landroid/app/AlertDialog$Builder;-><init>(Landroid/content/Context;)V

    const v1, 0x7f110032

    .line 454
    invoke-virtual {v0, v1}, Landroid/app/AlertDialog$Builder;->setTitle(I)Landroid/app/AlertDialog$Builder;

    const v1, 0x7f11022b

    .line 455
    invoke-virtual {v0, v1}, Landroid/app/AlertDialog$Builder;->setMessage(I)Landroid/app/AlertDialog$Builder;

    const/4 v1, 0x0

    .line 456
    invoke-virtual {v0, v1}, Landroid/app/AlertDialog$Builder;->setCancelable(Z)Landroid/app/AlertDialog$Builder;

    .line 457
    new-instance v1, Llt/noframe/gpsfarmguide/views/FragmentSettings$11;

    invoke-direct {v1, p0}, Llt/noframe/gpsfarmguide/views/FragmentSettings$11;-><init>(Llt/noframe/gpsfarmguide/views/FragmentSettings;)V

    const v2, 0x7f110174

    invoke-virtual {v0, v2, v1}, Landroid/app/AlertDialog$Builder;->setPositiveButton(ILandroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;

    .line 464
    invoke-virtual {v0}, Landroid/app/AlertDialog$Builder;->show()Landroid/app/AlertDialog;

    return-void
.end method

.method private showSelected()V
    .locals 8

    const-string v0, "distance_unit"

    .line 122
    invoke-virtual {p0, v0}, Lcom/github/machinarius/preferencefragment/PreferenceFragment;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

    move-result-object v0

    check-cast v0, Landroid/preference/ListPreference;

    .line 123
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getActivity()Landroidx/fragment/app/FragmentActivity;

    move-result-object v2

    invoke-static {v2}, Llt/noframe/gpsfarmguide/utils/Preferences;->getDistanceUnit(Landroid/content/Context;)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string v2, "."

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/preference/ListPreference;->setSummary(Ljava/lang/CharSequence;)V

    const-string v0, "area_unit"

    .line 125
    invoke-virtual {p0, v0}, Lcom/github/machinarius/preferencefragment/PreferenceFragment;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

    move-result-object v0

    check-cast v0, Landroid/preference/ListPreference;

    .line 126
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getActivity()Landroidx/fragment/app/FragmentActivity;

    move-result-object v3

    invoke-static {v3}, Llt/noframe/gpsfarmguide/utils/Preferences;->getAreaUnit(Landroid/content/Context;)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v1, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/preference/ListPreference;->setSummary(Ljava/lang/CharSequence;)V

    const-string v0, "speed_unit"

    .line 128
    invoke-virtual {p0, v0}, Lcom/github/machinarius/preferencefragment/PreferenceFragment;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

    move-result-object v0

    check-cast v0, Landroid/preference/ListPreference;

    .line 129
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getActivity()Landroidx/fragment/app/FragmentActivity;

    move-result-object v3

    invoke-static {v3}, Llt/noframe/gpsfarmguide/utils/Preferences;->getSpeedUnit(Landroid/content/Context;)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v1, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/preference/ListPreference;->setSummary(Ljava/lang/CharSequence;)V

    const-string v0, "locale"

    .line 131
    invoke-virtual {p0, v0}, Lcom/github/machinarius/preferencefragment/PreferenceFragment;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

    move-result-object v0

    check-cast v0, Landroid/preference/ListPreference;

    .line 132
    invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getActivity()Landroidx/fragment/app/FragmentActivity;

    move-result-object v1

    invoke-static {v1}, Llt/noframe/gpsfarmguide/utils/Languages;->getSelectedLocale(Landroid/content/Context;)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/preference/ListPreference;->setValue(Ljava/lang/String;)V

    .line 133
    invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getActivity()Landroidx/fragment/app/FragmentActivity;

    move-result-object v1

    invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getActivity()Landroidx/fragment/app/FragmentActivity;

    move-result-object v3

    invoke-static {v3}, Llt/noframe/gpsfarmguide/utils/Languages;->getSelectedLocale(Landroid/content/Context;)Ljava/lang/String;

    move-result-object v3

    invoke-static {v1, v3}, Llt/noframe/gpsfarmguide/utils/Languages;->getLocaleName(Landroid/content/Context;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/preference/ListPreference;->setSummary(Ljava/lang/CharSequence;)V

    const-string v0, "gps_refresh_rate_btn"

    .line 140
    invoke-virtual {p0, v0}, Lcom/github/machinarius/preferencefragment/PreferenceFragment;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

    move-result-object v0

    iput-object v0, p0, Llt/noframe/gpsfarmguide/views/FragmentSettings;->gps_refresh_rate_btn:Landroid/preference/Preference;

    .line 141
    iget-object v0, p0, Llt/noframe/gpsfarmguide/views/FragmentSettings;->gps_refresh_rate_btn:Landroid/preference/Preference;

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    sget-object v3, Llt/noframe/gpsfarmguide/utils/Preferences;->GPS_REFRESH_RATE:Llt/minvib/magicpreferences/MagicFloatPreference;

    invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getContext()Landroid/content/Context;

    move-result-object v4

    invoke-virtual {v3, v4}, Llt/minvib/magicpreferences/MagicFloatPreference;->get(Landroid/content/Context;)Ljava/lang/Float;

    move-result-object v3

    invoke-virtual {v1, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    const-string v3, " "

    invoke-virtual {v1, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const v3, 0x7f1101e7

    invoke-virtual {p0, v3}, Landroidx/fragment/app/Fragment;->getString(I)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v1, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/preference/Preference;->setSummary(Ljava/lang/CharSequence;)V

    const-string v0, "gps_location_in_tractor"

    .line 143
    invoke-virtual {p0, v0}, Lcom/github/machinarius/preferencefragment/PreferenceFragment;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

    move-result-object v0

    iput-object v0, p0, Llt/noframe/gpsfarmguide/views/FragmentSettings;->gps_location_in_tractor:Landroid/preference/Preference;

    .line 144
    iget-object v0, p0, Llt/noframe/gpsfarmguide/views/FragmentSettings;->gps_location_in_tractor:Landroid/preference/Preference;

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    iget-object v3, p0, Llt/noframe/gpsfarmguide/views/FragmentSettings;->f:Ljava/text/DecimalFormat;

    invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getActivity()Landroidx/fragment/app/FragmentActivity;

    move-result-object v4

    invoke-static {v4}, Llt/noframe/gpsfarmguide/utils/Preferences;->getGpsLocationInTractor(Landroid/content/Context;)D

    move-result-wide v4

    .line 145
    invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getActivity()Landroidx/fragment/app/FragmentActivity;

    move-result-object v6

    invoke-static {v6}, Llt/noframe/gpsfarmguide/utils/Preferences;->getGpsAccuracyUnit(Landroid/content/Context;)Ljava/lang/String;

    move-result-object v6

    .line 144
    invoke-static {v4, v5, v6}, Llt/noframe/gpsfarmguide/utils/Mathematics;->convertAccuracy(DLjava/lang/String;)D

    move-result-wide v4

    invoke-virtual {v3, v4, v5}, Ljava/text/DecimalFormat;->format(D)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v1, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string v3, "  "

    invoke-virtual {v1, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 146
    invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getActivity()Landroidx/fragment/app/FragmentActivity;

    move-result-object v4

    invoke-static {v4}, Llt/noframe/gpsfarmguide/utils/Preferences;->getGpsAccuracyUnit(Landroid/content/Context;)Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v1, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    .line 144
    invoke-virtual {v0, v1}, Landroid/preference/Preference;->setSummary(Ljava/lang/CharSequence;)V

    const-string v0, "implement_location"

    .line 148
    invoke-virtual {p0, v0}, Lcom/github/machinarius/preferencefragment/PreferenceFragment;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

    move-result-object v0

    iput-object v0, p0, Llt/noframe/gpsfarmguide/views/FragmentSettings;->implement_location:Landroid/preference/Preference;

    .line 149
    iget-object v0, p0, Llt/noframe/gpsfarmguide/views/FragmentSettings;->implement_location:Landroid/preference/Preference;

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    iget-object v4, p0, Llt/noframe/gpsfarmguide/views/FragmentSettings;->f:Ljava/text/DecimalFormat;

    invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getActivity()Landroidx/fragment/app/FragmentActivity;

    move-result-object v5

    invoke-static {v5}, Llt/noframe/gpsfarmguide/utils/Preferences;->getImplementLocation(Landroid/content/Context;)D

    move-result-wide v5

    .line 150
    invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getActivity()Landroidx/fragment/app/FragmentActivity;

    move-result-object v7

    invoke-static {v7}, Llt/noframe/gpsfarmguide/utils/Preferences;->getGpsAccuracyUnit(Landroid/content/Context;)Ljava/lang/String;

    move-result-object v7

    .line 149
    invoke-static {v5, v6, v7}, Llt/noframe/gpsfarmguide/utils/Mathematics;->convertAccuracy(DLjava/lang/String;)D

    move-result-wide v5

    invoke-virtual {v4, v5, v6}, Ljava/text/DecimalFormat;->format(D)Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v1, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 151
    invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getActivity()Landroidx/fragment/app/FragmentActivity;

    move-result-object v4

    invoke-static {v4}, Llt/noframe/gpsfarmguide/utils/Preferences;->getGpsAccuracyUnit(Landroid/content/Context;)Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v1, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    .line 149
    invoke-virtual {v0, v1}, Landroid/preference/Preference;->setSummary(Ljava/lang/CharSequence;)V

    const-string v0, "last_eqipment_width"

    .line 154
    invoke-virtual {p0, v0}, Lcom/github/machinarius/preferencefragment/PreferenceFragment;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

    move-result-object v0

    iput-object v0, p0, Llt/noframe/gpsfarmguide/views/FragmentSettings;->implement_width:Landroid/preference/Preference;

    .line 155
    iget-object v0, p0, Llt/noframe/gpsfarmguide/views/FragmentSettings;->implement_width:Landroid/preference/Preference;

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    iget-object v4, p0, Llt/noframe/gpsfarmguide/views/FragmentSettings;->f:Ljava/text/DecimalFormat;

    invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getActivity()Landroidx/fragment/app/FragmentActivity;

    move-result-object v5

    invoke-static {v5}, Llt/noframe/gpsfarmguide/utils/LastPickPrefrences;->getEquipmentWidth(Landroid/content/Context;)D

    move-result-wide v5

    .line 156
    invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getActivity()Landroidx/fragment/app/FragmentActivity;

    move-result-object v7

    invoke-static {v7}, Llt/noframe/gpsfarmguide/utils/Preferences;->getDeflectionUnit(Landroid/content/Context;)Ljava/lang/String;

    move-result-object v7

    .line 155
    invoke-static {v5, v6, v7}, Llt/noframe/gpsfarmguide/utils/Mathematics;->convertAccuracy(DLjava/lang/String;)D

    move-result-wide v5

    invoke-virtual {v4, v5, v6}, Ljava/text/DecimalFormat;->format(D)Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v1, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 157
    invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getActivity()Landroidx/fragment/app/FragmentActivity;

    move-result-object v3

    invoke-static {v3}, Llt/noframe/gpsfarmguide/utils/Preferences;->getDeflectionUnit(Landroid/content/Context;)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v1, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    .line 155
    invoke-virtual {v0, v1}, Landroid/preference/Preference;->setSummary(Ljava/lang/CharSequence;)V

    const-string v0, "gps_external"

    .line 161
    invoke-virtual {p0, v0}, Lcom/github/machinarius/preferencefragment/PreferenceFragment;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

    move-result-object v0

    iput-object v0, p0, Llt/noframe/gpsfarmguide/views/FragmentSettings;->gps_external:Landroid/preference/Preference;

    .line 162
    iget-object v0, p0, Llt/noframe/gpsfarmguide/views/FragmentSettings;->gps_external:Landroid/preference/Preference;

    new-instance v1, Llt/noframe/gpsfarmguide/views/FragmentSettings$1;

    invoke-direct {v1, p0}, Llt/noframe/gpsfarmguide/views/FragmentSettings$1;-><init>(Llt/noframe/gpsfarmguide/views/FragmentSettings;)V

    invoke-virtual {v0, v1}, Landroid/preference/Preference;->setOnPreferenceClickListener(Landroid/preference/Preference$OnPreferenceClickListener;)V

    const-string v0, "area_shown_as_polyline"

    .line 173
    invoke-virtual {p0, v0}, Lcom/github/machinarius/preferencefragment/PreferenceFragment;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

    move-result-object v0

    invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getContext()Landroid/content/Context;

    move-result-object v1

    invoke-static {v1}, Llt/noframe/gpsfarmguide/utils/Preferences;->isDisplaySprayedArea(Landroid/content/Context;)Z

    move-result v1

    invoke-virtual {v0, v1}, Landroid/preference/Preference;->setEnabled(Z)V

    const-string v0, "display_sprayed"

    .line 174
    invoke-virtual {p0, v0}, Lcom/github/machinarius/preferencefragment/PreferenceFragment;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

    move-result-object v0

    check-cast v0, Landroid/preference/CheckBoxPreference;

    new-instance v1, Llt/noframe/gpsfarmguide/views/FragmentSettings$2;

    invoke-direct {v1, p0}, Llt/noframe/gpsfarmguide/views/FragmentSettings$2;-><init>(Llt/noframe/gpsfarmguide/views/FragmentSettings;)V

    invoke-virtual {v0, v1}, Landroid/preference/CheckBoxPreference;->setOnPreferenceChangeListener(Landroid/preference/Preference$OnPreferenceChangeListener;)V

    const-string v0, "restore_backup"

    .line 183
    invoke-virtual {p0, v0}, Lcom/github/machinarius/preferencefragment/PreferenceFragment;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

    move-result-object v0

    iput-object v0, p0, Llt/noframe/gpsfarmguide/views/FragmentSettings;->restoreBackup:Landroid/preference/Preference;

    .line 184
    iget-object v0, p0, Llt/noframe/gpsfarmguide/views/FragmentSettings;->restoreBackup:Landroid/preference/Preference;

    new-instance v1, Llt/noframe/gpsfarmguide/views/FragmentSettings$3;

    invoke-direct {v1, p0}, Llt/noframe/gpsfarmguide/views/FragmentSettings$3;-><init>(Llt/noframe/gpsfarmguide/views/FragmentSettings;)V

    invoke-virtual {v0, v1}, Landroid/preference/Preference;->setOnPreferenceClickListener(Landroid/preference/Preference$OnPreferenceClickListener;)V

    const-string v0, "save_backup"

    .line 200
    invoke-virtual {p0, v0}, Lcom/github/machinarius/preferencefragment/PreferenceFragment;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

    move-result-object v0

    iput-object v0, p0, Llt/noframe/gpsfarmguide/views/FragmentSettings;->createBackup:Landroid/preference/Preference;

    .line 201
    iget-object v0, p0, Llt/noframe/gpsfarmguide/views/FragmentSettings;->createBackup:Landroid/preference/Preference;

    new-instance v1, Llt/noframe/gpsfarmguide/views/FragmentSettings$4;

    invoke-direct {v1, p0}, Llt/noframe/gpsfarmguide/views/FragmentSettings$4;-><init>(Llt/noframe/gpsfarmguide/views/FragmentSettings;)V

    invoke-virtual {v0, v1}, Landroid/preference/Preference;->setOnPreferenceClickListener(Landroid/preference/Preference$OnPreferenceClickListener;)V

    .line 256
    iget-object v0, p0, Llt/noframe/gpsfarmguide/views/FragmentSettings;->gps_refresh_rate_btn:Landroid/preference/Preference;

    new-instance v1, Llt/noframe/gpsfarmguide/views/FragmentSettings$5;

    invoke-direct {v1, p0}, Llt/noframe/gpsfarmguide/views/FragmentSettings$5;-><init>(Llt/noframe/gpsfarmguide/views/FragmentSettings;)V

    invoke-virtual {v0, v1}, Landroid/preference/Preference;->setOnPreferenceClickListener(Landroid/preference/Preference$OnPreferenceClickListener;)V

    .line 272
    iget-object v0, p0, Llt/noframe/gpsfarmguide/views/FragmentSettings;->gps_location_in_tractor:Landroid/preference/Preference;

    new-instance v1, Llt/noframe/gpsfarmguide/views/FragmentSettings$6;

    invoke-direct {v1, p0}, Llt/noframe/gpsfarmguide/views/FragmentSettings$6;-><init>(Llt/noframe/gpsfarmguide/views/FragmentSettings;)V

    invoke-virtual {v0, v1}, Landroid/preference/Preference;->setOnPreferenceClickListener(Landroid/preference/Preference$OnPreferenceClickListener;)V

    .line 294
    iget-object v0, p0, Llt/noframe/gpsfarmguide/views/FragmentSettings;->implement_location:Landroid/preference/Preference;

    new-instance v1, Llt/noframe/gpsfarmguide/views/FragmentSettings$7;

    invoke-direct {v1, p0}, Llt/noframe/gpsfarmguide/views/FragmentSettings$7;-><init>(Llt/noframe/gpsfarmguide/views/FragmentSettings;)V

    invoke-virtual {v0, v1}, Landroid/preference/Preference;->setOnPreferenceClickListener(Landroid/preference/Preference$OnPreferenceClickListener;)V

    .line 316
    iget-object v0, p0, Llt/noframe/gpsfarmguide/views/FragmentSettings;->implement_width:Landroid/preference/Preference;

    new-instance v1, Llt/noframe/gpsfarmguide/views/FragmentSettings$8;

    invoke-direct {v1, p0}, Llt/noframe/gpsfarmguide/views/FragmentSettings$8;-><init>(Llt/noframe/gpsfarmguide/views/FragmentSettings;)V

    invoke-virtual {v0, v1}, Landroid/preference/Preference;->setOnPreferenceClickListener(Landroid/preference/Preference$OnPreferenceClickListener;)V

    const-string v0, "accuracy_unit"

    .line 343
    invoke-virtual {p0, v0}, Lcom/github/machinarius/preferencefragment/PreferenceFragment;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

    move-result-object v0

    check-cast v0, Landroid/preference/ListPreference;

    .line 344
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getActivity()Landroidx/fragment/app/FragmentActivity;

    move-result-object v3

    invoke-static {v3}, Llt/noframe/gpsfarmguide/utils/Preferences;->getGpsAccuracyUnit(Landroid/content/Context;)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v1, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/preference/ListPreference;->setSummary(Ljava/lang/CharSequence;)V

    const-string v0, "deflection_unit"

    .line 346
    invoke-virtual {p0, v0}, Lcom/github/machinarius/preferencefragment/PreferenceFragment;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

    move-result-object v0

    check-cast v0, Landroid/preference/ListPreference;

    .line 347
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getActivity()Landroidx/fragment/app/FragmentActivity;

    move-result-object v3

    invoke-static {v3}, Llt/noframe/gpsfarmguide/utils/Preferences;->getDeflectionUnit(Landroid/content/Context;)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v1, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/preference/ListPreference;->setSummary(Ljava/lang/CharSequence;)V

    const-string v0, "show_tutorials_again"

    .line 350
    invoke-virtual {p0, v0}, Lcom/github/machinarius/preferencefragment/PreferenceFragment;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

    move-result-object v0

    new-instance v1, Llt/noframe/gpsfarmguide/views/FragmentSettings$9;

    invoke-direct {v1, p0}, Llt/noframe/gpsfarmguide/views/FragmentSettings$9;-><init>(Llt/noframe/gpsfarmguide/views/FragmentSettings;)V

    invoke-virtual {v0, v1}, Landroid/preference/Preference;->setOnPreferenceClickListener(Landroid/preference/Preference$OnPreferenceClickListener;)V

    return-void
.end method


# virtual methods
.method public onCreate(Landroid/os/Bundle;)V
    .locals 1

    .line 72
    invoke-super {p0, p1}, Lcom/github/machinarius/preferencefragment/PreferenceFragment;->onCreate(Landroid/os/Bundle;)V

    .line 73
    new-instance p1, Llt/noframe/gpsfarmguide/analytics/FireAnalytics;

    invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getContext()Landroid/content/Context;

    move-result-object v0

    invoke-direct {p1, v0}, Llt/noframe/gpsfarmguide/analytics/FireAnalytics;-><init>(Landroid/content/Context;)V

    iput-object p1, p0, Llt/noframe/gpsfarmguide/views/FragmentSettings;->fireAnalytics:Llt/noframe/gpsfarmguide/analytics/FireAnalytics;

    .line 75
    new-instance p1, Ljava/text/DecimalFormat;

    const-string v0, "#0.00"

    invoke-direct {p1, v0}, Ljava/text/DecimalFormat;-><init>(Ljava/lang/String;)V

    iput-object p1, p0, Llt/noframe/gpsfarmguide/views/FragmentSettings;->f:Ljava/text/DecimalFormat;

    const p1, 0x7f140002

    .line 76
    invoke-virtual {p0, p1}, Lcom/github/machinarius/preferencefragment/PreferenceFragment;->addPreferencesFromResource(I)V

    .line 77
    invoke-direct {p0}, Llt/noframe/gpsfarmguide/views/FragmentSettings;->showSelected()V

    return-void
.end method

.method public onCreateView(Landroid/view/LayoutInflater;Landroid/view/ViewGroup;Landroid/os/Bundle;)Landroid/view/View;
    .locals 2

    .line 82
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object v0

    invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getActivity()Landroidx/fragment/app/FragmentActivity;

    move-result-object v1

    invoke-virtual {v0, v1}, Llt/noframe/gpsfarmguide/Data;->getToolbarheight(Landroid/content/Context;)I

    move-result v0

    const/4 v1, 0x0

    invoke-virtual {p2, v1, v0, v1, v1}, Landroid/view/ViewGroup;->setPadding(IIII)V

    .line 83
    invoke-super {p0, p1, p2, p3}, Lcom/github/machinarius/preferencefragment/PreferenceFragment;->onCreateView(Landroid/view/LayoutInflater;Landroid/view/ViewGroup;Landroid/os/Bundle;)Landroid/view/View;

    move-result-object p1

    return-object p1
.end method

.method public onPause()V
    .locals 1

    .line 96
    invoke-super {p0}, Landroidx/fragment/app/Fragment;->onPause()V

    .line 97
    invoke-virtual {p0}, Lcom/github/machinarius/preferencefragment/PreferenceFragment;->getPreferenceScreen()Landroid/preference/PreferenceScreen;

    move-result-object v0

    invoke-virtual {v0}, Landroid/preference/PreferenceScreen;->getSharedPreferences()Landroid/content/SharedPreferences;

    move-result-object v0

    .line 98
    invoke-interface {v0, p0}, Landroid/content/SharedPreferences;->unregisterOnSharedPreferenceChangeListener(Landroid/content/SharedPreferences$OnSharedPreferenceChangeListener;)V

    return-void
.end method

.method public onPreferenceTreeClick(Landroid/preference/PreferenceScreen;Landroid/preference/Preference;)Z
    .locals 0

    .line 449
    invoke-super {p0, p1, p2}, Lcom/github/machinarius/preferencefragment/PreferenceFragment;->onPreferenceTreeClick(Landroid/preference/PreferenceScreen;Landroid/preference/Preference;)Z

    move-result p1

    return p1
.end method

.method public onRequestPermissionsResult(I[Ljava/lang/String;[I)V
    .locals 0

    .line 103
    invoke-super {p0, p1, p2, p3}, Landroidx/fragment/app/Fragment;->onRequestPermissionsResult(I[Ljava/lang/String;[I)V

    const-string p2, "android.permission.WRITE_EXTERNAL_STORAGE"

    const/16 p3, 0x465

    if-ne p3, p1, :cond_0

    .line 105
    invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getActivity()Landroidx/fragment/app/FragmentActivity;

    move-result-object p3

    invoke-static {p3, p2}, Landroidx/core/content/ContextCompat;->checkSelfPermission(Landroid/content/Context;Ljava/lang/String;)I

    move-result p3

    if-nez p3, :cond_0

    .line 107
    invoke-virtual {p0}, Llt/noframe/gpsfarmguide/views/FragmentSettings;->startRestoreBackupPicker()V

    :cond_0
    const/16 p3, 0x466

    if-ne p3, p1, :cond_1

    .line 110
    invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getActivity()Landroidx/fragment/app/FragmentActivity;

    move-result-object p1

    invoke-static {p1, p2}, Landroidx/core/content/ContextCompat;->checkSelfPermission(Landroid/content/Context;Ljava/lang/String;)I

    move-result p1

    if-nez p1, :cond_1

    .line 112
    invoke-virtual {p0}, Llt/noframe/gpsfarmguide/views/FragmentSettings;->startSaveBackupPicker()V

    :cond_1
    return-void
.end method

.method public onResume()V
    .locals 2

    .line 88
    invoke-super {p0}, Landroidx/fragment/app/Fragment;->onResume()V

    .line 89
    :try_start_0
    invoke-static {}, Llt/noframe/gpsfarmguide/App;->getContext()Landroid/content/Context;

    move-result-object v0

    check-cast v0, Llt/noframe/gpsfarmguide/views/ActivityDrawer;

    invoke-virtual {v0}, Landroidx/appcompat/app/AppCompatActivity;->getSupportActionBar()Landroidx/appcompat/app/ActionBar;

    move-result-object v0

    const v1, 0x7f1100ba

    invoke-virtual {p0, v1}, Landroidx/fragment/app/Fragment;->getString(I)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroidx/appcompat/app/ActionBar;->setTitle(Ljava/lang/CharSequence;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 90
    :catch_0
    invoke-virtual {p0}, Lcom/github/machinarius/preferencefragment/PreferenceFragment;->getPreferenceScreen()Landroid/preference/PreferenceScreen;

    move-result-object v0

    invoke-virtual {v0}, Landroid/preference/PreferenceScreen;->getSharedPreferences()Landroid/content/SharedPreferences;

    move-result-object v0

    .line 91
    invoke-interface {v0, p0}, Landroid/content/SharedPreferences;->registerOnSharedPreferenceChangeListener(Landroid/content/SharedPreferences$OnSharedPreferenceChangeListener;)V

    return-void
.end method

.method public onSharedPreferenceChanged(Landroid/content/SharedPreferences;Ljava/lang/String;)V
    .locals 6

    const-string p1, "distance_unit"

    .line 393
    invoke-virtual {p2, p1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result p1

    const-string v0, "."

    if-eqz p1, :cond_0

    .line 394
    invoke-virtual {p0, p2}, Lcom/github/machinarius/preferencefragment/PreferenceFragment;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

    move-result-object p1

    .line 395
    new-instance p2, Ljava/lang/StringBuilder;

    invoke-direct {p2}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getActivity()Landroidx/fragment/app/FragmentActivity;

    move-result-object v1

    invoke-static {v1}, Llt/noframe/gpsfarmguide/utils/Preferences;->getDistanceUnit(Landroid/content/Context;)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {p2, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {p2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {p2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p2

    invoke-virtual {p1, p2}, Landroid/preference/Preference;->setSummary(Ljava/lang/CharSequence;)V

    .line 396
    iget-object p1, p0, Llt/noframe/gpsfarmguide/views/FragmentSettings;->fireAnalytics:Llt/noframe/gpsfarmguide/analytics/FireAnalytics;

    invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getActivity()Landroidx/fragment/app/FragmentActivity;

    move-result-object p2

    invoke-static {p2}, Llt/noframe/gpsfarmguide/utils/Preferences;->getDistanceUnit(Landroid/content/Context;)Ljava/lang/String;

    move-result-object p2

    invoke-virtual {p1, p2}, Llt/noframe/gpsfarmguide/analytics/FireAnalytics;->sendSettingDistanceUnit(Ljava/lang/String;)V

    goto/16 :goto_0

    :cond_0
    const-string p1, "area_unit"

    .line 397
    invoke-virtual {p2, p1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result p1

    if-eqz p1, :cond_1

    .line 398
    invoke-virtual {p0, p2}, Lcom/github/machinarius/preferencefragment/PreferenceFragment;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

    move-result-object p1

    .line 399
    new-instance p2, Ljava/lang/StringBuilder;

    invoke-direct {p2}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getActivity()Landroidx/fragment/app/FragmentActivity;

    move-result-object v1

    invoke-static {v1}, Llt/noframe/gpsfarmguide/utils/Preferences;->getAreaUnit(Landroid/content/Context;)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {p2, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {p2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {p2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p2

    invoke-virtual {p1, p2}, Landroid/preference/Preference;->setSummary(Ljava/lang/CharSequence;)V

    .line 400
    iget-object p1, p0, Llt/noframe/gpsfarmguide/views/FragmentSettings;->fireAnalytics:Llt/noframe/gpsfarmguide/analytics/FireAnalytics;

    invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getActivity()Landroidx/fragment/app/FragmentActivity;

    move-result-object p2

    invoke-static {p2}, Llt/noframe/gpsfarmguide/utils/Preferences;->getAreaUnit(Landroid/content/Context;)Ljava/lang/String;

    move-result-object p2

    invoke-virtual {p1, p2}, Llt/noframe/gpsfarmguide/analytics/FireAnalytics;->sendSettingAreaUnit(Ljava/lang/String;)V

    goto/16 :goto_0

    :cond_1
    const-string p1, "speed_unit"

    .line 401
    invoke-virtual {p2, p1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result p1

    if-eqz p1, :cond_2

    .line 402
    invoke-virtual {p0, p2}, Lcom/github/machinarius/preferencefragment/PreferenceFragment;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

    move-result-object p1

    .line 403
    new-instance p2, Ljava/lang/StringBuilder;

    invoke-direct {p2}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getActivity()Landroidx/fragment/app/FragmentActivity;

    move-result-object v1

    invoke-static {v1}, Llt/noframe/gpsfarmguide/utils/Preferences;->getSpeedUnit(Landroid/content/Context;)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {p2, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {p2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {p2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p2

    invoke-virtual {p1, p2}, Landroid/preference/Preference;->setSummary(Ljava/lang/CharSequence;)V

    .line 404
    iget-object p1, p0, Llt/noframe/gpsfarmguide/views/FragmentSettings;->fireAnalytics:Llt/noframe/gpsfarmguide/analytics/FireAnalytics;

    invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getActivity()Landroidx/fragment/app/FragmentActivity;

    move-result-object p2

    invoke-static {p2}, Llt/noframe/gpsfarmguide/utils/Preferences;->getSpeedUnit(Landroid/content/Context;)Ljava/lang/String;

    move-result-object p2

    invoke-virtual {p1, p2}, Llt/noframe/gpsfarmguide/analytics/FireAnalytics;->sendSettingSpeedUnit(Ljava/lang/String;)V

    goto/16 :goto_0

    :cond_2
    const-string p1, "accuracy_unit"

    .line 405
    invoke-virtual {p2, p1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result p1

    if-eqz p1, :cond_3

    .line 406
    invoke-virtual {p0, p2}, Lcom/github/machinarius/preferencefragment/PreferenceFragment;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

    move-result-object p1

    .line 407
    new-instance p2, Ljava/lang/StringBuilder;

    invoke-direct {p2}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getActivity()Landroidx/fragment/app/FragmentActivity;

    move-result-object v1

    invoke-static {v1}, Llt/noframe/gpsfarmguide/utils/Preferences;->getGpsAccuracyUnit(Landroid/content/Context;)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {p2, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {p2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {p2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p2

    invoke-virtual {p1, p2}, Landroid/preference/Preference;->setSummary(Ljava/lang/CharSequence;)V

    .line 408
    iget-object p1, p0, Llt/noframe/gpsfarmguide/views/FragmentSettings;->fireAnalytics:Llt/noframe/gpsfarmguide/analytics/FireAnalytics;

    invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getActivity()Landroidx/fragment/app/FragmentActivity;

    move-result-object p2

    invoke-static {p2}, Llt/noframe/gpsfarmguide/utils/Preferences;->getGpsAccuracyUnit(Landroid/content/Context;)Ljava/lang/String;

    move-result-object p2

    invoke-virtual {p1, p2}, Llt/noframe/gpsfarmguide/analytics/FireAnalytics;->sendSettingGpsAccuracyUnit(Ljava/lang/String;)V

    .line 413
    iget-object p1, p0, Llt/noframe/gpsfarmguide/views/FragmentSettings;->implement_location:Landroid/preference/Preference;

    new-instance p2, Ljava/lang/StringBuilder;

    invoke-direct {p2}, Ljava/lang/StringBuilder;-><init>()V

    iget-object v1, p0, Llt/noframe/gpsfarmguide/views/FragmentSettings;->f:Ljava/text/DecimalFormat;

    invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getActivity()Landroidx/fragment/app/FragmentActivity;

    move-result-object v2

    invoke-static {v2}, Llt/noframe/gpsfarmguide/utils/Preferences;->getImplementLocation(Landroid/content/Context;)D

    move-result-wide v2

    .line 414
    invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getActivity()Landroidx/fragment/app/FragmentActivity;

    move-result-object v4

    invoke-static {v4}, Llt/noframe/gpsfarmguide/utils/Preferences;->getGpsAccuracyUnit(Landroid/content/Context;)Ljava/lang/String;

    move-result-object v4

    .line 413
    invoke-static {v2, v3, v4}, Llt/noframe/gpsfarmguide/utils/Mathematics;->convertAccuracy(DLjava/lang/String;)D

    move-result-wide v2

    invoke-virtual {v1, v2, v3}, Ljava/text/DecimalFormat;->format(D)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {p2, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string v1, "  "

    invoke-virtual {p2, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 415
    invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getActivity()Landroidx/fragment/app/FragmentActivity;

    move-result-object v2

    invoke-static {v2}, Llt/noframe/gpsfarmguide/utils/Preferences;->getGpsAccuracyUnit(Landroid/content/Context;)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {p2, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {p2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {p2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p2

    .line 413
    invoke-virtual {p1, p2}, Landroid/preference/Preference;->setSummary(Ljava/lang/CharSequence;)V

    .line 417
    iget-object p1, p0, Llt/noframe/gpsfarmguide/views/FragmentSettings;->gps_location_in_tractor:Landroid/preference/Preference;

    new-instance p2, Ljava/lang/StringBuilder;

    invoke-direct {p2}, Ljava/lang/StringBuilder;-><init>()V

    iget-object v2, p0, Llt/noframe/gpsfarmguide/views/FragmentSettings;->f:Ljava/text/DecimalFormat;

    invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getActivity()Landroidx/fragment/app/FragmentActivity;

    move-result-object v3

    invoke-static {v3}, Llt/noframe/gpsfarmguide/utils/Preferences;->getGpsLocationInTractor(Landroid/content/Context;)D

    move-result-wide v3

    .line 418
    invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getActivity()Landroidx/fragment/app/FragmentActivity;

    move-result-object v5

    invoke-static {v5}, Llt/noframe/gpsfarmguide/utils/Preferences;->getGpsAccuracyUnit(Landroid/content/Context;)Ljava/lang/String;

    move-result-object v5

    .line 417
    invoke-static {v3, v4, v5}, Llt/noframe/gpsfarmguide/utils/Mathematics;->convertAccuracy(DLjava/lang/String;)D

    move-result-wide v3

    invoke-virtual {v2, v3, v4}, Ljava/text/DecimalFormat;->format(D)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {p2, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {p2, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 419
    invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getActivity()Landroidx/fragment/app/FragmentActivity;

    move-result-object v2

    invoke-static {v2}, Llt/noframe/gpsfarmguide/utils/Preferences;->getGpsAccuracyUnit(Landroid/content/Context;)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {p2, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {p2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {p2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p2

    .line 417
    invoke-virtual {p1, p2}, Landroid/preference/Preference;->setSummary(Ljava/lang/CharSequence;)V

    .line 422
    iget-object p1, p0, Llt/noframe/gpsfarmguide/views/FragmentSettings;->implement_width:Landroid/preference/Preference;

    new-instance p2, Ljava/lang/StringBuilder;

    invoke-direct {p2}, Ljava/lang/StringBuilder;-><init>()V

    iget-object v2, p0, Llt/noframe/gpsfarmguide/views/FragmentSettings;->f:Ljava/text/DecimalFormat;

    invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getActivity()Landroidx/fragment/app/FragmentActivity;

    move-result-object v3

    invoke-static {v3}, Llt/noframe/gpsfarmguide/utils/LastPickPrefrences;->getEquipmentWidth(Landroid/content/Context;)D

    move-result-wide v3

    .line 423
    invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getActivity()Landroidx/fragment/app/FragmentActivity;

    move-result-object v5

    invoke-static {v5}, Llt/noframe/gpsfarmguide/utils/Preferences;->getDeflectionUnit(Landroid/content/Context;)Ljava/lang/String;

    move-result-object v5

    .line 422
    invoke-static {v3, v4, v5}, Llt/noframe/gpsfarmguide/utils/Mathematics;->convertAccuracy(DLjava/lang/String;)D

    move-result-wide v3

    invoke-virtual {v2, v3, v4}, Ljava/text/DecimalFormat;->format(D)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {p2, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {p2, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 424
    invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getActivity()Landroidx/fragment/app/FragmentActivity;

    move-result-object v1

    invoke-static {v1}, Llt/noframe/gpsfarmguide/utils/Preferences;->getDeflectionUnit(Landroid/content/Context;)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {p2, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {p2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {p2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p2

    .line 422
    invoke-virtual {p1, p2}, Landroid/preference/Preference;->setSummary(Ljava/lang/CharSequence;)V

    goto/16 :goto_0

    :cond_3
    const-string p1, "deflection_unit"

    .line 426
    invoke-virtual {p2, p1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result p1

    if-eqz p1, :cond_4

    .line 427
    invoke-virtual {p0, p2}, Lcom/github/machinarius/preferencefragment/PreferenceFragment;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

    move-result-object p1

    .line 428
    new-instance p2, Ljava/lang/StringBuilder;

    invoke-direct {p2}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getActivity()Landroidx/fragment/app/FragmentActivity;

    move-result-object v1

    invoke-static {v1}, Llt/noframe/gpsfarmguide/utils/Preferences;->getDeflectionUnit(Landroid/content/Context;)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {p2, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {p2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {p2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p2

    invoke-virtual {p1, p2}, Landroid/preference/Preference;->setSummary(Ljava/lang/CharSequence;)V

    .line 429
    iget-object p1, p0, Llt/noframe/gpsfarmguide/views/FragmentSettings;->fireAnalytics:Llt/noframe/gpsfarmguide/analytics/FireAnalytics;

    invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getActivity()Landroidx/fragment/app/FragmentActivity;

    move-result-object p2

    invoke-static {p2}, Llt/noframe/gpsfarmguide/utils/Preferences;->getDeflectionUnit(Landroid/content/Context;)Ljava/lang/String;

    move-result-object p2

    invoke-virtual {p1, p2}, Llt/noframe/gpsfarmguide/analytics/FireAnalytics;->sendSettingNavigationUnit(Ljava/lang/String;)V

    goto :goto_0

    :cond_4
    const-string p1, "keep_screen_on"

    .line 430
    invoke-virtual {p2, p1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result p1

    if-eqz p1, :cond_5

    .line 431
    invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getActivity()Landroidx/fragment/app/FragmentActivity;

    move-result-object p1

    invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getActivity()Landroidx/fragment/app/FragmentActivity;

    move-result-object p2

    invoke-static {p2}, Llt/noframe/gpsfarmguide/utils/Preferences;->isKeepScreenOn(Landroid/content/Context;)Z

    move-result p2

    invoke-static {p1, p2}, Llt/noframe/gpsfarmguide/utils/ScreenHelper;->keepScreenOn(Landroid/content/Context;Z)V

    .line 432
    iget-object p1, p0, Llt/noframe/gpsfarmguide/views/FragmentSettings;->fireAnalytics:Llt/noframe/gpsfarmguide/analytics/FireAnalytics;

    invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getActivity()Landroidx/fragment/app/FragmentActivity;

    move-result-object p2

    invoke-static {p2}, Llt/noframe/gpsfarmguide/utils/Preferences;->isKeepScreenOn(Landroid/content/Context;)Z

    move-result p2

    invoke-virtual {p1, p2}, Llt/noframe/gpsfarmguide/analytics/FireAnalytics;->sendSettingKeepScreenOn(Z)V

    goto :goto_0

    :cond_5
    const-string p1, "display_sprayed"

    .line 434
    invoke-virtual {p2, p1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result p1

    if-eqz p1, :cond_6

    .line 436
    iget-object p1, p0, Llt/noframe/gpsfarmguide/views/FragmentSettings;->fireAnalytics:Llt/noframe/gpsfarmguide/analytics/FireAnalytics;

    invoke-virtual {p1}, Llt/noframe/gpsfarmguide/analytics/FireAnalytics;->sendSettingDisplaySprayArea()V

    goto :goto_0

    :cond_6
    const-string p1, "locale"

    .line 438
    invoke-virtual {p2, p1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result p2

    if-eqz p2, :cond_7

    .line 439
    iget-object p2, p0, Llt/noframe/gpsfarmguide/views/FragmentSettings;->fireAnalytics:Llt/noframe/gpsfarmguide/analytics/FireAnalytics;

    invoke-virtual {p2, p1}, Llt/noframe/gpsfarmguide/analytics/FireAnalytics;->sendSettingsLanguage(Ljava/lang/String;)V

    .line 440
    invoke-direct {p0}, Llt/noframe/gpsfarmguide/views/FragmentSettings;->restartApp()V

    :cond_7
    :goto_0
    return-void
.end method

.method startRestoreBackupPicker()V
    .locals 2

    .line 378
    invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getActivity()Landroidx/fragment/app/FragmentActivity;

    move-result-object v0

    new-instance v1, Llt/noframe/gpsfarmguide/views/FragmentSettings$10;

    invoke-direct {v1, p0}, Llt/noframe/gpsfarmguide/views/FragmentSettings$10;-><init>(Llt/noframe/gpsfarmguide/views/FragmentSettings;)V

    invoke-static {v0, v1}, Llt/noframe/gpsfarmguide/dialogs/BackupDialogs;->intersectionsDialog(Landroid/content/Context;Llt/noframe/gpsfarmguide/dialogs/BackupDialogs$OnBackupDialogListener;)V

    return-void
.end method

.method startSaveBackupPicker()V
    .locals 3

    .line 365
    new-instance v0, Lcom/nbsp/materialfilepicker/MaterialFilePicker;

    invoke-direct {v0}, Lcom/nbsp/materialfilepicker/MaterialFilePicker;-><init>()V

    .line 366
    invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getActivity()Landroidx/fragment/app/FragmentActivity;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/nbsp/materialfilepicker/MaterialFilePicker;->withActivity(Landroid/app/Activity;)Lcom/nbsp/materialfilepicker/MaterialFilePicker;

    sget v1, Llt/noframe/gpsfarmguide/views/ActivityDrawer;->REQUEST_SELECT_BACKUP_SAVE_PLACE:I

    .line 367
    invoke-virtual {v0, v1}, Lcom/nbsp/materialfilepicker/MaterialFilePicker;->withRequestCode(I)Lcom/nbsp/materialfilepicker/MaterialFilePicker;

    const-string v1, ""

    .line 368
    invoke-static {v1}, Ljava/util/regex/Pattern;->compile(Ljava/lang/String;)Ljava/util/regex/Pattern;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/nbsp/materialfilepicker/MaterialFilePicker;->withFilter(Ljava/util/regex/Pattern;)Lcom/nbsp/materialfilepicker/MaterialFilePicker;

    const/4 v1, 0x0

    .line 369
    invoke-virtual {v0, v1}, Lcom/nbsp/materialfilepicker/MaterialFilePicker;->withFilterDirectories(Z)Lcom/nbsp/materialfilepicker/MaterialFilePicker;

    const v2, 0x7f1101af

    .line 370
    invoke-virtual {p0, v2}, Landroidx/fragment/app/Fragment;->getString(I)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v2}, Lcom/nbsp/materialfilepicker/MaterialFilePicker;->setSaveButtonText(Ljava/lang/String;)Lcom/nbsp/materialfilepicker/MaterialFilePicker;

    const/4 v2, 0x1

    .line 371
    invoke-virtual {v0, v2}, Lcom/nbsp/materialfilepicker/MaterialFilePicker;->setChooseFolder(Z)Lcom/nbsp/materialfilepicker/MaterialFilePicker;

    .line 372
    invoke-virtual {v0, v1}, Lcom/nbsp/materialfilepicker/MaterialFilePicker;->withHiddenFiles(Z)Lcom/nbsp/materialfilepicker/MaterialFilePicker;

    .line 373
    invoke-virtual {v0}, Lcom/nbsp/materialfilepicker/MaterialFilePicker;->start()V

    return-void
.end method
